<!DOCTYPE html>
<html>
<#include "../head.html">
<body>
<table class="mc">
    <tr>
        <td class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                <!--管理员信息---}-->
                <div class="nav-wrap">
                    <#include "../borrow/left.html">
                </div>
            </div>
            <!--左侧导航---}-->
        </td>
        <td class="mc-m">
            <div class="navToggle"></div>
        </td>
        <td class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
            <!--顶部导航---}-->

            <!--面包屑导航---{-->
            <#assign moduleName="理财宝列表">
            <#include "../borrow/banner.html">
            <!--面包屑导航---}-->

            <!--工具栏--{-->
				<div id="toolbar" class="clearfix">
				<div class="toolbor-module export">
                    <input type="button" onclick="addInit()" value="添加" class="input-button export-btn"/>
                </div>
					<div class="toolbor-module search">
						<input type="button" value="搜索" class="input-button" onclick="sousuo();">
					</div>
					<div class="toolbor-module search">
						<input type="text" name="name" id="name" value="请输入理财宝名" data-value="请输入理财宝名" class="search-value">
					</div>
					
					<div class="toolbor-module search">
	                	<div style="height:22px;line-height:22px;float:left;">理财宝状态：</div>
						<div class="select-box" id="status">
							<div class="tag-select">全部</div>
							<ul class="tag-options">
								<li data-value="-1" <#if params.get("status")?? && params.get("status") == -1 >data-selected="selected"</#if>>全部</li>
								<li data-value="0" <#if params.get("status")?? && params.get("status") == 0 >data-selected="selected"</#if>>停用</li>
								<li data-value="1" <#if params.get("status")?? && params.get("status") == 1 >data-selected="selected"</#if>>启用</li>
							</ul>
						</div>
					</div>
					
					<div class="toolbor-module search">
	                	<div style="height:22px;line-height:22px;float:left;">理财宝审核状态：</div>
						<div class="select-box" id="audit_status">
							<div class="tag-select">全部</div>
							<ul class="tag-options">
								<li data-value="-1" <#if params.get("audit_status")?? && params.get("audit_status") == -1 >data-selected="selected"</#if>>全部</li>
								<li data-value="0" <#if params.get("audit_status")?? && params.get("audit_status") == 0 >data-selected="selected"</#if>>待审核</li>
								<li data-value="1" <#if params.get("audit_status")?? && params.get("audit_status") == 1 >data-selected="selected"</#if>>审核通过</li>
								<li data-value="2" <#if params.get("audit_status")?? && params.get("audit_status") == 2 >data-selected="selected"</#if>>审核未通过</li>
							</ul>
						</div>
					</div>
				</div> 
			<!--工具栏<td></td>-->
            	<div id="main" class="clearfix">
					<table class="data-list">
                        <tr class="header">
                            <td>理财宝名</td>
                            <td>用户名称</td>
                            <td>理财宝状态</td>
                            <td>理财宝审核状态</td>
                            <td>理财宝赎回审核</td>
                            <td>理财宝总额</td>
                            <td>已投资总额</td>
                            <td>天利率</td>
                            <td>管理费费率</td>
                            <td>生息间隔时间</td>
                            <td>赎回限制时间</td>
                            <td>单笔最低投资额度</td>
                            <td>添加时间</td>
                            <td width="15%">操作</td>
                        </tr>
                        <#if (itemList?exists)&&(itemList?size>0)>
                    	<#list itemList as item>
                        <tr class="s">
                        	<td>${item.name!"-"}</td>
                            <td>${item.username!"-"}</td>
                            <td><font color="red"><#if item.status == 1>启用<#else>停用</#if></font></td>
                            <td><font color="red"><#if item.audit_status == 0>待审核<#elseif item.audit_status == 1>审核通过<#else>审核未通过</#if></font></td>
                            <td><font color="red"><#if item.back_verify_type == 0>赎回无需审核<#elseif item.back_verify_type == 1>赎回需要审核<#else>-</#if></font></td>
                            <td>${item.account}</td>
                            <td>${item.invest}</td>
                            <td>${item.apr}%</td>
                             <td>${item.manager_apr}%</td>
                            <td><#if item.interest_time == 0>即时生息<#else>${item.interest_time?c}天后</#if></td>
                            <td> <#if item.back_time == 0>随时提取<#else>${item.back_time?c}天</#if></td>
                            <td><#if item.min_account == 0>无限制<#else>${item.min_account?c}元</#if></td>
                            <td>${dateformat(item.add_time?c)}</td>
                            <td><#if item.status == 1><a href="/admin/treasure/editSatus.html?id=${(item.id!)?c}&status=0">停用</a><#else><a  href="/admin/treasure/editSatus.html?id=${(item.id!)?c}&status=1">启用</a></#if>&nbsp;&nbsp;<a href="/admin/treasure/editInit.html?id=${(item.id!)?c}" title="修改理财宝信息">修改</a>&nbsp;&nbsp;
                            <#if item.audit_status == 0><a href="/admin/treasure/audit.html?id=${(item.id!)?c}">审核</a></#if>
                            <#if item.back_verify_type == 0><a href="/admin/treasure/editBackStatus.html?id=${(item.id!)?c}&back_verify_type=1">赎回审核启用</a><#elseif item.back_verify_type == 1><a href="/admin/treasure/editBackStatus.html?id=${(item.id!)?c}&back_verify_type=0">赎回审核停用</a></#if>
                            </td>
                        </tr>
                    </#list><#else><tr><td colspan="12">无符合条件信息！</td></tr>
                    </#if>
                    </table>
                    
                    <!--翻页系统--{-->
					<div class="container">
					</div>
					<!--翻页系统--}-->
                    
					<!--底部工具栏--{-->
					<div id="bottomToolbar" class="clearfix">
						<div class="other-tool">
							<dl class="refresh-data">
								<dt class="refresh-data-icon"></dt>
								<dd>
									<a href="javascript:void(0);" class="refresh-page">刷新数据</a>
								</dd>
							</dl>
						</div>
						 <!--翻页系统--{-->
	                    <div class="container">
	                        <#import "../../common/page.html" as pager><@pager.pagination page=page url="/admin/treasure/list.html" map=params style="style1"  />
	                    </div>
	                    <!--翻页系统--}-->
					</div>
					<!--底部工具栏--}-->

					<script>
	                    function sousuo(){
	                    	var url = '/admin/treasure/list.html?search=true';
	                        var sou = "";
	                        var audit_status = $("#audit_status").find(".open-selected").attr("data-value");
	                        if (audit_status != "" && audit_status!=null){
	            				sou += "&audit_status="+audit_status;
	            			}
	                        var status = $("#status").find(".open-selected").attr("data-value");
	                        if (status!="" && status!=null){
	            				sou += "&status="+status;
	            			}
	                        var name = $("#name").val();
	                        if (name!=null&&name!=""&&name!="undefine"&&name!="请输入理财宝名"){
	                            sou += "&name="+name;
	                        }
	                        if (sou!=""){
	                            location.href=url+sou;
	                        }else location.href=url;
	                    }
	                    function addInit(){
                            location.href="/admin/treasure/add.html";
                        }
					</script>
				</div>
		</td>
    </tr>
    <tr>
	    <!--尾部--{-->
	    <td colspan="3" class="mc-b"><#include "../foot.html"></td>
	    <!--尾部--}-->
	</tr>
</table>

</body>
</html>
<#include "../jsPage.html">
